package com.hon2;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class Datetwo {
    public static void main(String[] args) {
        LocalDate one = LocalDate.now();//获取当前时间
        System.out.println(one);
        LocalTime two = LocalTime.now();
        System.out.println(two);
        LocalDateTime three =  LocalDateTime.now();
        System.out.println(three);
        LocalDate four = LocalDate.of(2018,05,11);
        System.out.println(four);
        four = one.plusMonths(100);//后推100月
        System.out.println(four);

        LocalDate five = LocalDate.now();
        LocalDate six = five.minusDays(150);// 前推150天
        System.out.println(six);



    }
}
